package com.ucode.springboot.starter.fileStorage.provider.qcloud;

import java.io.IOException;

import com.ucode.springboot.starter.fileStorage.UploadObject;
import com.ucode.springboot.starter.fileStorage.UploadResult;
import com.ucode.springboot.starter.fileStorage.provider.AbstractProvider;
import com.ucode.springboot.starter.fileStorage.utils.FilePathHelper;

import cn.hutool.core.lang.Assert;

public class QcloudProvider extends AbstractProvider{
    
    
    public QcloudProvider(String clientId,String urlprefix, String bucketName, String accessKey, String secretKey,String regionName,boolean isPrivate){
        Assert.notBlank(clientId, "[groupId] not defined");
        Assert.notBlank(bucketName, "[bucketName] not defined");
        Assert.notBlank(accessKey, "[accessKey] not defined");
        Assert.notBlank(secretKey, "[secretKey] not defined");
        Assert.notBlank(urlprefix, "[urlprefix] not defined");
        
        this.clientId = clientId;
        this.urlprefix = urlprefix.endsWith(FilePathHelper.DIR_SPLITER) ? urlprefix : urlprefix + FilePathHelper.DIR_SPLITER;
        this.bucketName = bucketName;
        
        
    }

    @Override
    public String providerName() {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public UploadResult upload(UploadObject object) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public String getDownloadUrl(String fileKey) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public boolean delete(String fileKey) {
        // TODO Auto-generated method stub
        return false;
    }

    @Override
    public void close() throws IOException {
        // TODO Auto-generated method stub
        
    }

}
